#
# @lc app=leetcode.cn id=496 lang=python
#
# [496] 下一个更大元素 I
#

# @lc code=start
class Solution(object):
    def nextGreaterElement(self, nums1, nums2):
        """
        :type nums1: List[int]
        :type nums2: List[int]
        :rtype: List[int]
        """
        result = []
        for num in nums1:
            index = nums2.index(num)
            for i in range(index+1, len(nums2)):
                if nums2[i] > num:
                    result.append(nums2[i])
                    break
            else:
                result.append(-1)
                
        return result
# @lc code=end

